package design.pattern.factory.abstractFactory;

import design.pattern.factory.abstractFactory.impl.AppleFactory;
import design.pattern.factory.abstractFactory.impl.BananaFactory;
import design.pattern.factory.abstractFactory.impl.OrangeIceFactory;
import design.pattern.factory.factory.IceCream;


/**
 * @program: design-pattern
 * @description:
 * @author: dong.chang
 * @create: 2021-04-22 13:14
 **/
public class AbstractFactoryTest {
    public static void main(String[] args) {

        IceCreamFactory factory = new AppleFactory();
        BigIceCream bigCup = factory.createBigCup();
        bigCup.taste();

        IceCreamFactory bananaFactory = new BananaFactory();
        BigIceCream bigBananaCup = bananaFactory.createBigCup();
        bigBananaCup.taste();

        IceCreamFactory orangeIceFactory = new OrangeIceFactory();
        BigIceCream bigCup1 = orangeIceFactory.createBigCup();
        bigCup1.taste();
    }
}
